#!/bin/sh

usage() {
    echo "usage:$0 [deploydb|deploy|xml-java-schema|premium]"
}

run_profile() {
    if test x$1 = x'premium'; then
        mvn -Dmaven.test.skip=true -P premium clean install
    else
    	mvn -pl build -P $1 exec:exec -D$1
    fi
}

if [ "$#" -eq 0 ]; then
    usage
    exit 1
fi

for cmd in $@
do
    run_profile $cmd
done
